perm filename FOLLOW.SAI[HAK,HPM] blob sn#507068 filedate 1980-04-29 generic text, type T, neo UTF8
begin "follow"
integer TV, MP, OLD;	external integer RPGSW;
print ("Physical TV number to follow: "); TV ← (6 lsh 33 + 1) + cvo(inchwl) lsh 18;
print ("Where to watch (CR for this TV, else ", (if RPGSW then "PHYS" else "LOG"), "ICAL line #): "); MP ← cvo(inchwl);
if MP = 0 then
	if RPGSW then call ((-1 lsh 18) + location (('17 lsh 27)+location(MP)), "ttyset")
	else start_code seto 1,; ttcall 6,1; hrrzm 1,MP end;
if not RPGSW then MP ← 1 lsh 27 + MP lsh 18
else if (MP←MP-'60) < 0 then usererr (0, 0, "No such terminal!");
call (cvsix("who   "), "setnam");
start_code label swr, cono;
	move MP;
	hrrm cono;
	setz;
	calli '400015;
	 jfcl;
	setom OLD;
	hrri swr;
	hrli '400017;
	calli '400003;
	ttcall;
	calli '12;
swr:	move TV;	comment WARNING! Remember IOT-USER mode!;
	calli '400070;
	skipe 1,RPGSW;
	 trz '17;
	camn OLD;
	 calli '400024;
	movem OLD;
	jumpn 1,cono;
	move 1,MP;
	calli 1,'400070;
	 jfcl;
	calli '400024;
cono:	'734200000000;
	'734140000000;
	calli '400024
end
end "follow"